/**
 * Sample React Native App
 * https://github.com/facebook/react-native
 * @flow
 */
import {Platform} from 'react-native';
import {Navigation} from 'react-native-navigation';

import {registerScreens} from './src/screen/index';
import {Provider} from 'react-redux';
import configuerStore from './src/store/index';

const {store} = configuerStore(() => {
});
// 执行注册页面方法
registerScreens(store, Provider);

// 启动app
Navigation.startTabBasedApp({
    tabs: [
        {
            label: 'home',
            screen: 'home',
            title: '發達網',
            icon: require('./src/assets/home.png')
        },
        {
            screen: 'popularize',
            title: '我的發達',
            icon: require('./src/assets/add.png'),
            iconInsets: {
                top: 5,
                left: 0,
                bottom: -5,
                right: 0
            }
        },
        {
            label: 'mine',
            screen: 'mine',
            title: '直播',
            icon: require('./src/assets/mine.png')
        }
    ],
    drawer: { // optional, add this if you want a side menu drawer in your app
        left: { // optional, define if you want a drawer from the left
            screen: 'user-slider', // unique ID registered with Navigation.registerScreen
            //passProps: {} // simple serializable object that will pass as props to all top screens (optional),
            fixedWidth: 500 // a fixed width you want your left drawer to have (optional)
        }
        },
        appStyle: {
            navBarBackgroundColor: '#12D3E1', //顶部导航栏背景颜色
            navBarTextColor: 'white' //顶部导航栏字体颜色
        },
        tabsStyle: {
            tabBarButtonColor: '#ccc', //底部按钮颜色
            tabBarSelectedButtonColor: '#08cb6a', //底部按钮选择状态颜色
            tabBarBackgroundColor: '#E6E6E6' //顶部条背景颜色
        }
    });

